import Mock from "mockjs";

//import data from './data.json'

let user = {
    status: true,
    token: Mock.Random.string('lower',20),
    message: ''
}
let userInfo = {
    userId: '@id',
    username: '@name',
    nickname: Mock.Random.cname(),
    sex: Mock.Random.integer(0,1),
    avatar(){
        return Mock.Random.image('100×100', Mock.Random.color(), '#757575', 'png', this.nickName)
    }
};

//正则表达式匹配/user/login
const login = Mock.mock(/\/user\/login/,user);
//正则表达式匹配/user/info
const getUserInfo = Mock.mock(/\/user\/info/,userInfo);

export {login,getUserInfo};
